package com.ccq.service;

import com.ccq.mapper.*;
import com.ccq.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class IndexService {
    @Autowired
    private UserMapper mapper;

    @Autowired
    private GoodhourseMapper gh;

    @Autowired
    private NewhourseMapper nh;

    @Autowired
    private AllfloorMapper af;

    @Autowired
    private BrokerMapper bo;

    public User checklogin(User user){
        return mapper.selectuser(user);
    }

    public int register(User user){
        return mapper.insert(user);
    }

    public List<Goodhourse> good(){
        return gh.selectalldata();
    }

    public List<Newhourse> newh(){
        return nh.selectalldata();
    }

    public List<Allfloor> allfloor(){
        return af.selectalldata();
    }

    public List<Broker> broker(){
        return bo.selectalldata();
    }
}
